#ifndef RSIM_RSIMSMARTPOINTER_H
#define RSIM_RSIMSMARTPOINTER_H

/* -------------------------------------------------------------------------- *
 * File: RSIMSmartPointer.h                                                   *
 * Authors: Kishor Bhalerao                                                   *
 * Email : kishor8dm@gmail.com                                                *
 * Contributors:                                                              *
 * Email:                                                                     *
 * copyright (c) 2010 Authors.                                                *
 *                                                                            *
 * This program is free software: you can redistribute it and/or modify it    *
 * under the terms of the GNU General Public License as published by the Free *
 * Software Foundation, either version 3 of the License, or any later version.*
 *                                                                            *
 * This program is distributed in the hope that it will be useful, but        *
 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY *
 * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License   *
 * for more details. (http://www.gnu.org/licenses/)                           *
 * -------------------------------------------------------------------------- */

#include <iostream>

// kdb: This class is not yet complete.

using namespace std;

namespace RSIM{	
template <class T>
class RSIMSmartPointer{
        private:
                T *ptr_;
        public:
                /** Create a smart pointer*/
                explicit RSIMSmartPointer(T *ptr = NULL):ptr_(ptr){}
                
                /** free memory*/
                ~RSIMSmartPointer(){delete ptr_;}
                
                /** Access the pointer data */
                T& operator*(){return *ptr_;}
                
                /** Access the pointer data */
                T* operator->(){return ptr_;}
}; // class RSIMSmartPointer

} // namespace RSIM

#endif